<%--
  Created by IntelliJ IDEA.
  User: 29276
  Date: 2021/8/21
  Time: 16:06
  To change this template use File | Settings | File Templates.
--%>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
    //http://localhost:8080/01_sxtoa_war_exploded/
%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <base href="<%=basePath%>"/>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>审核报销单</title>
    <link href="css/style.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="js/jquery.js"></script>
    <script type="text/javascript">
        function submitForm(){
            window.close();

        }

    </script>

    <script type="text/javascript">
        $(function () {
            $("#btn").click(function () {
                var reqData = $("#auditFm").serialize();
                $.post("expenseServlet", reqData, function (data) {
                    if (data === "sessionTimeOut") {
                        window.location.href="login.jsp";
                        return;
                    }
                    if (data === '1') {
                        alert("通过，待付款！");
                    } else if (data === '2') {
                        alert("通过，金额过大，待复核！");
                    } else if (data === '3') {
                        alert("驳回，请修改！");
                    } else if (data === '4') {
                        alert("通过，已付款！");
                    } else {
                        alert("拒绝！");
                    }
                    window.close();
                    window.opener.reloadPage();
                })
            })
        })
    </script>
</head>

<body>

<div class="formtitle"><span>审核报销单</span></div>
<form id="auditFm">
    <ul class="forminfo">

        <input name="expId" type="hidden" value="${param.expId}" />
        <input name="methodName" type="hidden" value="audit" />

        <li>
            <label>审核金额</label>
            <input name="totalAmount" type="text" readonly value="${param.totalAmount}" class="dfinput" />
        </li>
        <li>
            <label>审核结果</label>
            <input name="result" type="radio" value="通过" />通过
            <input name="result" type="radio" value="拒绝" />拒绝
            <input name="result" type="radio" value="驳回" />驳回
        </li>
        <li>
            <label>审核意见</label>
            <input name="auditDesc" type="text" class="dfinput" />
        </li>
        <li>
            <label>&nbsp;</label>
            <input id="btn" name="" type="button" class="btn" value="确认保存" />
        </li>
    </ul>
</form>
</body>

</html>
